package com.fdb.efp.nls.service.impl;

import com.fdb.basic.framework.core.base.FrameworkService;
import com.fdb.efp.nls.service.dao.LoanAccNoDao;
import com.fdb.efp.nls.service.domain.LoanAccNo;
import com.fdb.efp.nls.service.facade.LoanAccNoService;
import com.fdb.efp.nls.service.vo.LoanAccNoVo;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 
 * 账户配置表
 * 
 * @author liyakui
 * @since 2019年1月7日 下午8:14:33
 * @version 1.0
 */
@Service("loanAccNoService")
public class LoanAccNoServiceImpl implements LoanAccNoService, FrameworkService {
	Logger logger = LoggerFactory.getLogger(LoanAccNoServiceImpl.class);
	@Autowired
	private LoanAccNoDao loanAccNoDao;

	@SuppressWarnings("unchecked")
	@Override
	public List<LoanAccNoVo> queryLoanAccNo(LoanAccNoVo loanAccNoVo) {
		logger.info("查询账户配置表开始！");
		List<LoanAccNoVo> list = null;
		try {
			LoanAccNo loanAccNo = new LoanAccNo();
			beanCopy(loanAccNoVo, loanAccNo);
			List<LoanAccNo> loanAccNos = loanAccNoDao.queryLoanAccNo(loanAccNo);
			list = (List<LoanAccNoVo>) beansCopy(loanAccNos, LoanAccNoVo.class);
		} catch (Exception e) {
			e.printStackTrace();
			logger.debug("查询账户配置表异常！");

		}
		logger.info("查询账户成功！查询结果：" + list);
		return list;
	}

}
